﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Data;
using DTO;

namespace Bussiness {
    public class ThamSoService {
        /// <summary>
        /// lay ra quy dinh
        /// </summary>
        /// <param name="parameterName">tham so</param>
        /// <returns></returns>
        public int GetRules(string parameterName) {
            ThamSoRepository res = new ThamSoRepository();
            return res.GetRules(parameterName);
        }

        public bool IsUsed(string parameterName) {
            ThamSoRepository res = new ThamSoRepository();
            return res.IsUsed(parameterName);
        }

        public List<ThamSoDTO> GetThamSoList() {
            ThamSoRepository res = new ThamSoRepository();
            return res.GetThamSoList();
        }

        public bool UpdateThamSo(List<ThamSoDTO> thamSoList) {
            ThamSoRepository res = new ThamSoRepository();
            return  res.UpdateThamSo(thamSoList);
        }
    }    
}
